
<html>
<head>
<script LANGUAGE="JavaScript">

  function show_hide_column(col_no,do_show) {
 

    var stl;
    if (do_show) stl = 'block'
    else         stl = 'none';

    if (!do_show){
        if(col_no>4)
        {
        col_no--;
        document.form1.rnd_num.value=col_no;
        }
    }

    var tbl  = document.getElementById('id_of_table');
    var rows = tbl.getElementsByTagName('tr');

    for (var row=0; row<rows.length;row++) {
      var cels = rows[row].getElementsByTagName('td')
      cels[col_no].style.display=stl;
    }
    
        if (do_show)
        {
        col_no++;
        document.form1.rnd_num.value=col_no;
        }
       

  }

</script>

</head>
<body>

<table id='id_of_table' border=1>
  <tr>
        <td>Name</td>
        <td>Round 1</td>
        <td>Round 2</td>
        <td>Round 3</td>
        <td style="display:none;">Round 4</td>
        <td style="display:none;">Round 5</td>
        <td style="display:none;">Round 6</td>
  </tr>
  <tr>
      <td>Tim</td>
      <td><input type='text' name='T-R1' size='3'></td>
      <td><input type='text' name='T-R2' size='3'></td>
      <td><input type='text' name='T-R3' size='3'></td>
      <td style="display:none;"><input type='text' name='T-R4' size='3'></td>
      <td style="display:none;"><input type='text' name='T-R5' size='3'></td>
      <td style="display:none;"><input type='text' name='T-R6' size='3'></td>
  </tr>
  <tr>
      <td>Mike</td>
      <td><input type='text' name='M-R1' size='3'></td>
      <td><input type='text' name='M-R2' size='3'></td>
      <td><input type='text' name='M-R3' size='3'></td>
      <td style="display:none;"><input type='text' name='M-R4' size='3'></td>
      <td style="display:none;"><input type='text' name='M-R5' size='3'></td>
      <td style="display:none;"><input type='text' name='M-R6' size='3'></td>
  </tr>
</table>


<form name="form1">
<input type="hidden" value="4" name="rnd_num">

  <br>             <input type='button' onClick='javascript:show_hide_column(rnd_num.value,true);' value='Add Round'>
                   <input type='button' onClick='javascript:show_hide_column(rnd_num.value,false);' value='Remove Round'>

</form>

</body>
</html> 
